/**
 * Created by Fantasy on 2016/1/10.
 * This function is used to configure routing, the function has more than one attribute parameters
 *  @version beta 1.0
 *  @parameters {string} stateName
 *  @parameters {string} stateUrl
 *  @parameters {list} viewList
 *  @parameters {string} target: Which is written dom hierarchy
 *  @parameters {string} template: html module
 */
define(function (require) {
    'use strict';
    /*===============router_controller start=========================*/

    ePart.router.start();

    ePart.router.initialLayout({
        stateName: 'index',
        template: require('text!template/defaultLayout/defaultLayout.html')
    });

    ePart.router.defaultLayout({
        stateName: 'index',
        template: require('text!template/WebHeader.html'),
        target: 'headerWrapper@index',
        controllerModule: 'WebHeader',
        controller: require('block/WebHeader')
    });

    ePart.router.defaultLayout({
        stateName: 'index',
        template: require('text!template/omHome.html'),
        target: 'bodyWrapper@index',
        controllerModule: 'indexHome',
        controller: require('block/omHome')
    });

    ePart.router.defaultLayout({
        stateName: 'index',
        template: require('text!template/omBottomModule.html'),
        target: 'footerWrapper@index',
        controllerModule: 'Bottom',
        controller: require('block/bottomModule')
    });

    ePart.router.blockLayout({
        stateName: 'index.Home',
        stateUrl: '/HOME',
        template: '',
        target: '',
        controllerModule: '',
        controller: ''
    });

    ePart.router.blockLayout({
        stateName: 'index.Vod',
        stateUrl: '/VOD',
        template: require('text!template/HomeTeaser.html'),
        target: 'bodyWrapper@index',
        controllerModule: 'HomeTeaser',
        controller: require('block/homeTeaser')
    });

    ePart.router.blockLayout({
        stateName: 'index.Kid',
        stateUrl: '/KIDS',
        template: 'here is kids',
        target: 'bodyWrapper@index',
        controllerModule: 'omHome',
        controller: ''
    });

    ePart.router.blockLayout({
        stateName: 'index.Person',
        stateUrl: '/PERSON',
        template: 'here is person',
        target: 'bodyWrapper@index',
        controllerModule: 'omHome',
        controller: ''
    });

    ePart.router.blockLayout({
        stateName: 'index.Setting',
        stateUrl: '/SETTING',
        template: 'here is Setting',
        target: 'bodyWrapper@index',
        controllerModule: 'omHome',
        controller: ''
    });

    ePart.router.blockLayout({
        stateName: 'index.Searching',
        stateUrl: '/SEARCH',
        template: require('text!template/SearchResult.html'),
        target: 'bodyWrapper@index',
        controllerModule: 'SearchResult',
        controller: require('block/SearchResult')
    });
    ePart.router.blockLayout({
        stateName: 'index.VodDetail',
        stateUrl: '/VODDETAIL' + '/:vodNumber',
        template: require('text!template/VodDetail.html'),
        target: 'bodyWrapper@index',
        controllerModule: 'VodDetail',
        controller: require('block/VodDetail')
    });

    /*===============router_controller end=========================*/
    /*===============router_controller start_dialog=========================*/
    ePart.router.blockDialog({
        dialogName: 'loginDialog',
        template: require('text!template/loginDialog.html'),
        controller: require('block/LoginDialog'),
        overlay: false
    });

    ePart.router.blockDialog({
        dialogName: 'loginOut',
        template: require('text!template/LogoutDialog.html'),
        overlay: false,
        controller: require('block/LoginDialog')
    });
    /*===============router_controller end_dialog=========================*/
});


